"""
@name : 算法练习
@author : gushuai
@projectname : Tools
"""
#
# list = [23,1,4,5,6,1,1,1,1,1]
# for i in list:
#     if list.count(i) > len(list)//2:
#         print(i)
#         break



# dict1={}
# list = [23,1,4,5,6,1,1,1,1,1]
# list2 = sorted(list,key=lambda x:(x<0,abs(x)))
#
# for i in list2:
#     if i in dict1:
#         dict1[i] += 1
#     else:
#         dict1[i] = 1
#     if dict1[i] > len(list)//2:
#         print(i)
#         break


# list = [1,2,3,4,5,5,5,6,1,1,1,1,1,1,1,1]
# list2 = sorted(list,key=lambda x:(x<0,abs(x)))
# shu = 1
# for i in range(len(list2)-1):
#     if list2[i] == list2[i+1]:
#         shu += 1
#     else:
#         if shu > len(list)//2:
#             print(list2[i])
#             break
